Skip to content

Remove all deprecated recipes + update MCP tool guidance - #1400

Merged
rezrah merged 5 commits into
mainfrom
rezrah/update-mcp-server-again
Jul 21, 2026
Merged

Remove all deprecated recipes + update MCP tool guidance#1400
rezrah merged 5 commits into
mainfrom
rezrah/update-mcp-server-again

Conversation

@rezrah

@rezrah rezrah commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

Towards https://github.com/github/brand-experience/issues/248

Takes latest human eval feedback and applies it to the MCP server, specifically the primer_brand_review tool.

⚠️ In this PR we're also removing all non-flexsuite recipes as they are currently making the primer_brand_examples tool a bit too complicated and less precise than we need it to be.

List of notable changes:

  • Updates guidance about Hero gridlines
  • Tighter matching of sub components
  • Removed /recipe stories for ALL non-flex-suite recipes

What should reviewers focus on?

  • Are there any side-effects to removing these recipes?
  • Just reading through the changes

Steps to test:

  1. Code review

Contributor checklist:

  • All new and existing CI checks pass
  • Tests prove that the feature works and covers both happy and unhappy paths
  • Any drop in coverage, breaking changes or regressions have been documented above
  • UI Changes contain new visual snapshots (generated by adding update snapshots label to the PR)
  • All developer debugging and non-functional logging has been removed
  • Related issues have been referenced in the PR description

Reviewer checklist:

  • Check that pull request and proposed changes adhere to our contribution guidelines and code of conduct
  • Check that tests prove the feature works and covers both happy and unhappy paths
  • Check that there aren't other open Pull Requests for the same update/change

Screenshots:

image

@rezrah
rezrah requested a review from a team as a code owner July 15, 2026 11:19
Copilot AI review requested due to automatic review settings July 15, 2026 11:19
@changeset-bot

changeset-bot Bot commented Jul 15, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d77bae6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@primer/brand-mcp Patch
@primer/react-brand Patch
@primer/brand-css Patch
@primer/brand-primitives Patch
@primer/brand-e2e Patch
@primer/brand-fonts Patch
@primer/brand-config Patch
@primer/brand-docs Patch
@primer/brand-storybook Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

🟢 No design token changes found

@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

🟢 Bundle size report

CheckMainBranchChange
UMD — full bundle (JS)101.39 kB101.39 kB🟢 No change
UMD — full bundle (CSS)66.92 kB66.92 kB🟢 No change
ESM — full bundle (JS + CSS)1.51 MB1.51 MB🟢 No change
ESM — tree-shaken simple (Button)69.81 kB69.81 kB🟢 No change
ESM — tree-shaken complex (ActionMenu)78.70 kB78.70 kB🟢 No change

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Brand MCP guidance and rule-based validation to better reflect current Primer Brand page-composition guardrails (especially around gridlines, Rivers, CTABanner balance requirements, and tighter root-vs-subcomponent matching).

Changes:

  • Expanded page-level composition guidance in page-design.md and strengthened page-design tool snapshot tests.
  • Improved primer_brand_examples goal parsing so generic “page” terms don’t drown out meaningful goals, and added a general-recipe fallback behavior for page goals.
  • Refined primer_brand_review parsing/rules (root tag detection, new balanced CTABanner rule, narrower raw-form-controls detection) and extended tests to cover recipes too.
Show a summary per file
File Description
packages/mcp/src/tools/primer-brand-page-design/primer-brand-page-design.test.ts Adds assertions to lock in the expanded page-design guidance output.
packages/mcp/src/tools/primer-brand-examples/primer-brand-examples.ts Updates examples tool goal parsing and how/when it selects full-page recipes.
packages/mcp/src/tools/primer-brand-examples/primer-brand-examples.test.ts Adds coverage for the “general recipe + goal-specific components” behavior.
packages/mcp/src/test-utils/catalog.ts Adds a CTAForm catalog entry so it can appear in ranked examples/tests.
packages/mcp/src/review/rules.ts Tightens component root-tag matching, adjusts raw form control detection, and adds a balanced CTABanner rule.
packages/mcp/src/review/rules.test.ts Extends rule tests (subcomponent prop validation, River gridline alignment, balanced CTABanner requirement, raw form controls, recipes in canonical examples).
packages/mcp/scripts/generate-catalog.mjs Aligns catalog contradiction detection with the new “root tags only” matching.
packages/mcp/content/page-design.md Rewrites and expands page composition guidance into explicit Do/Don’t + verification checklist.
.changeset/clear-pages-compose.md Publishes the MCP guidance improvements as a patch changeset.

Review details

  • Files reviewed: 9/9 changed files
  • Comments generated: 2
  • Review effort level: Low

Comment thread packages/mcp/src/tools/primer-brand-examples/primer-brand-examples.ts Outdated
Comment thread packages/mcp/src/review/rules.ts Outdated
@github-actions

Copy link
Copy Markdown
Contributor

🟢 No visual differences found

Our visual comparison tests did not find any differences in the UI.

@github-actions

Copy link
Copy Markdown
Contributor

🟢 No unit test coverage changes found

All components and hooks with tests maintain the same coverage as the main branch.

@rezrah rezrah changed the title Update primer_brand_review guardrails Remove all deprecated recipes + update MCP tool guidance Jul 20, 2026
@rezrah
rezrah requested a review from danielguillan July 20, 2026 15:02
@rezrah
rezrah merged commit 29cf9f0 into main Jul 21, 2026
17 checks passed
@rezrah
rezrah deleted the rezrah/update-mcp-server-again branch July 21, 2026 13:19
@primer primer Bot mentioned this pull request Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants